<template>
	<view  class="index">
		<u-tabs
			:list="productCategory" 
			:is-scroll="true" 
			:current="current" 
			@change="change"
			bg-color="#ffc659"
			active-color="#000000"
			height="65"
		></u-tabs>
	</view>
</template>

<script>
	import {mapState} from 'vuex'
	export default {
		data() {
			return {
				current: 0
			};
		},
		computed: {
			...mapState(['productCategory'])
		},
		methods: {
			change(index){
				this.current = index
				this.$emit('change',{item: this.productCategory[index]})
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>
